const initianState = {
    all: [],
    foo: 'hello'
}

const all = (state = [], action) => {
    let { type, payload } = action
    switch (type) {
        case "GET_PRODUCTS":
            return [...payload]
        default:
            return state
    }
}

export default (state = initianState, action) => {
    return {
        all: all(state.all, action),
        foo: state.foo
    }
}